package com.kuyun.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kuyun.entity.User1;
import com.kuyun.entity.UserComment;

public interface LoginMapper {
	
	// 查询用户是否存在
   public User1 getUser1(@Param(value = "userId") String userId, @Param(value = "password") String password)
			throws Exception;
	
	// 插入用户信息（注册）
	public int doRegister(@Param(value = "userId") String userId, @Param(value = "userName") String userName,
			              @Param(value = "password") String password, @Param(value = "userAge") Integer userAge,
			              @Param(value = "userSex") String userSex)
				throws Exception;
	
	// 查询用户名
	public String getUserName(@Param(value = "userId") String userId);
	
	// 插入用户信息（注册）
	public int doCommentSave(@Param(value = "userId") String userId, @Param(value = "userName") String userName,
				              @Param(value = "comment") String comment, 
				              @Param(value = "curDate") Date curDate)
					throws Exception;
	
	// 查询发表数据
	public List<UserComment> getCommentList(@Param(value = "userId") String userId);
	
	// 删除发表信息
	public int delectComment(@Param(value = "comment") String comment);

}
